/*
 * @Author: deng da chao
 * @Date: 2022-11-28 15:41:38
 * @LastEditTime: 2023-10-11 17:30:23
 * @Description: 生产相关接口
 */
import http from '../../utils/http'
// 开启生产
const postDragonIncubatorStartIncubation = (data) => {
  return http.post('/dragon/dragonIncubator/startIncubation', data)
}

// 立即收蛋
const postDragonIncubatorCollect = (data) => {
  return http.post('/dragon/dragonIncubator/collect', data)
}

// 停止生产
const postDragonIncubatorStopIncubation = (data) => {
  return http.post('/dragon/dragonIncubator/stopIncubation', data)
}

//漫谷生产器列表页
const getDragonIncubatorList = (data) => {
  return http.get('/dragon/dragonIncubator/list', data)
} 

//漫谷生产器配置日志列表页
const getDragonIncubatorConfLogList = (data) => {
  return http.get('/dragon/dragonIncubatorConfLog/list', data)
}

//漫谷生产器生产日志列表页
const getDragonIncubatorLogList = (data) => {
  return http.get('/dragon/dragonIncubatorLog/list', data)
}


//会员龙族列表
const getSysMemberNftPetsList = (data) => {
  return http.get('/member/sysMemberNft/petsList', data)
}

//放置卡槽
const putPlaceDragonCardSlot = (data) => {
  return http.put('/dragon/dragonCardSlot/placeDragonCardSlot', data)
}

// 道具列表页
const getSysMemberNftPropNftList = (data) => {
  return http.get(`/member/sysMemberNft/propNftList`, data)
}


// 龙族道具使用
const postSysMemberNftPetProp = (data) => {
  return http.post(`/member/sysMemberNft/petProp`, data)
}

// 道具使用记录
const getNftPropUseRecordPage = (data) => {
  return http.get(`/nft/nftPropUseRecord/page`, data)
}

// 下架卡槽
const putDragonCardSlotLowerShelfDragonCardSlot = (data) => {
  return http.put(`/dragon/dragonCardSlot/lowerShelfDragonCardSlot`, data)
}

// 根据卡槽获取任务进度
const getSysMemeberInviteLogGetCardInvite = (data) => {
  return http.get(`/dragon/sysMemeberInviteLog/getCardInvite`, data)
}

// 邀请记录表
const getSysMemeberInviteLogGetInviteLog = (data) => {
  return http.get(`/dragon/sysMemeberInviteLog/getInviteLog`, data)
}

// 获取邀请激活记录表
const getSysMemeberInviteLogGetActiveLog = (data) => {
  return http.get(`/dragon/sysMemeberInviteLog/getActiveLog`, data)
}

// 我的任务表
const getSysMemeberInviteLogGetMyTask = (data) => {
  return http.get(`/dragon/sysMemeberInviteLog/getMyTask`, data)
}

// 邀请记录奖励表
const getSysMemeberInviteLogList = (data) => {
  return http.get(`/dragon/sysMemeberInviteLog/list`, data)
}

// 获取卡槽详情
const getOneById = (data) => {
  return http.get(`/dragon/dragonCardSlot/getOneById`, data)
}

// 下架卡槽前置接口
const putLowerShelfDragonCardSlotBefore = (data) => {
  return http.put(`/dragon/dragonCardSlot/lowerShelfDragonCardSlotBefore`, data)
}

// 获取用户材料详情数据
const getSysMemberEgggetEggInfo = (data) => {
  return http.get(`/dragon/sysMemberEgg/getEggInfo`, data)
}

// 发布材料售卖
const postEggPublishSell = (data) => {
  return http.post(`/dragon/sysMemberEgg/eggPublishSell`, data)
  // return http.post(`/dragon/sysMemberEggNew/eggPublishSellNew`, data)
}

// 材料订单售卖记录详情
const getEggOrderMainList = (data) => {
  return http.get(`/dragon/sysMemberEgg/getEggOrderMainList`, data)
}

// 材料订单售卖记录列表
const getSysMemberEggList = (data) => {
  return http.get(`/dragon/sysMemberEgg/list`, data)
}

// 取消材料售卖
const postSysMemberEggEggCancelSell = (data) => {
  return http.post(`/dragon/sysMemberEgg/eggCancelSell`, data)
  // return http.post(`/dragon/sysMemberEggNew/eggCancelSellNew`, data)
}

// 补充电量度前置接口,传生产器id
const postReplenishDurabilityPre = (data) => {
  return http.post(`/dragon/dragonIncubator/replenishDurabilityPre`, data)
}

//补充电量度
const postReplenishDurability = (data) => {
  return http.post(`/dragon/dragonIncubator/replenishDurability`, data)
}

// 查询解锁卡槽信息
const getQueryUnlockSlotId = (data) => {
  return http.get(`/dragon/dragonCardSlot/query-unlock-slot/${data.slotId}`, data)
}

//解锁卡槽信息
const putUnlockSlot = (data) => {
  return http.put(`/dragon/dragonCardSlot/unlock-slot/${data.slotId}`, data)
}

// 获取用户生产器详情数据
const getDragonGetIncubatorInfo = (data) => {
  return http.get(`/dragon/sysMemberEgg/getIncubatorInfo`, data)
}

// 集市获取三个售卖数量和价格
const getMarketSellTotalCount = (data) => {
  return http.get(`/dragon/sysMemberEgg/getMarketSellTotalCount`, data)
}

// 集市获取材料售卖数量和价格
const getMarketSell = (data) => {
  return http.get(`/dragon/sysMemberEgg/getMarketSell`, data)
}


//获取最近交易均价
const getLatestEggPrice = (data) => {
  return http.get(`/dragon/sysMemberEgg/getLatestEggPrice`, data)
}

// 获取实时分成数量和白龙孵化总数
const getAllShareFiveCurrency = (data) => {
  return http.get(`/nft/darkDragonShareCurrencyLog/getAllShareFiveCurrency`, data)
}

// 检测时间接口
const getCheckDateByFiveAndSixIncubator = (data) => {
  return http.get(`/dragon/dragonIncubator/getCheckDateByFiveAndSixIncubator`, data)
}

//获取当前商品参与掠夺的总和
const getDetailByNftStr = (data) => {
  return http.get(`/nft/darkDragonShareCurrencyLog/getDetailByNftStr`, data)
}

// 获取材料区间
const getInfoPriceInterval = (data) => {
  return http.get(`/dragon/sysMemberEgg/getInfoPriceInterval`, data)
}

// 获取黑龙卡槽产出列表/lxc/api/v1/dragon/dragonCardSlot/getDarkDragonShareList
const getDarkDragonShareList = (data) => {
  return http.get(`/dragon/dragonCardSlot/getDarkDragonShareList`, data)
}

// 获取写字楼卡槽消耗详情
const geXiezilouShareList = (data) => {
  return http.get(`/dragon/dragonCardSlot/geXiezilouShareList`, data)
}
// 获取商业体卡槽消耗详情
const getShangyetiShareList = (data) => {
  return http.get(`/dragon/dragonCardSlot/getShangyetiShareList`, data)
}



//查询通过Nft解锁卡槽信息
const getQueryUnlockSlotNft = (data) => {
  return http.get(`/dragon/dragonCardSlot/query-unlock-slot-nft/${data.slotId}`, data)
}

//使用nft解锁卡槽信息
const putUnlockSlotNft = (data) => {
  return http.put(`/dragon/dragonCardSlot/unlock-slot-nft/${data.slotId}`, data)
}

// 补给记录list
const nftSupplementActivityList = (data) => {
  return http.get(`/nft/nftSupplementActivity/list`, data)
}
// 补给记录详情
const nftSupplementActivityDetails = (data) => {
  return http.get(`nft/nftSupplementActivity/getDetails/${data.id}/${data.times}`, data)
}
// 确认补给
const nftSupplementSupplementValue = (data) => {
  return http.post(`/nft/nftSupplementActivity/supplementValue`, data)
}

//查看掉落详情
const nftRandomFallingPrizeQuery = (data) => {
  return http.get(`/nft/nftRandomFallingPrize/query`, data)
}

// 补给记录log list
const nftSupplementActivityLogList = (data) => {
  return http.get(`/nft/nftSupplementActivityLog/list`, data)
}
// 补给记录log 详情
const nftSupplementActivityLogDetails = (data) => {
  return http.get(`/nft/nftSupplementActivityLog/getDetails/${data.id}`, data)
}



//停车场营运记录/lxc/api/v1/dragon/dragonCardSlot/getEggTimeLogById
const getEggTimeLogById = (data) => {
  return http.get(`/dragon/dragonCardSlot/getEggTimeLogById`, data)
}
//查看掉落详情
const getNftRandomFallingPrize = (data) => {
  return http.get(`/nft/nftRandomFallingPrize/list`, data)
}

export default {
  postDragonIncubatorStartIncubation,
  postDragonIncubatorCollect,
  postDragonIncubatorStopIncubation,
  getDragonIncubatorList,
  getDragonIncubatorConfLogList,
  getDragonIncubatorLogList,
  getSysMemberNftPetsList,
  putPlaceDragonCardSlot,
  getSysMemberNftPropNftList,
  postSysMemberNftPetProp,
  getNftPropUseRecordPage,
  putDragonCardSlotLowerShelfDragonCardSlot,
  getSysMemeberInviteLogGetCardInvite,
  getSysMemeberInviteLogGetInviteLog,
  getSysMemeberInviteLogGetActiveLog,
  getSysMemeberInviteLogGetMyTask,
  getSysMemeberInviteLogList,
  getOneById,
  putLowerShelfDragonCardSlotBefore,
  getSysMemberEgggetEggInfo,
  postEggPublishSell,
  getEggOrderMainList,
  getSysMemberEggList,
  postSysMemberEggEggCancelSell,
  postReplenishDurabilityPre,
  postReplenishDurability,
  getQueryUnlockSlotId,
  putUnlockSlot,
  getDragonGetIncubatorInfo,
  getMarketSellTotalCount,
  getMarketSell,
  getLatestEggPrice,
  getAllShareFiveCurrency,
  getCheckDateByFiveAndSixIncubator,
  getDetailByNftStr,
  getInfoPriceInterval,
  getDarkDragonShareList,
  geXiezilouShareList,
  getShangyetiShareList,
  getQueryUnlockSlotNft,
  putUnlockSlotNft,

  nftSupplementActivityList,
  nftSupplementActivityDetails,
  nftSupplementSupplementValue,
  nftRandomFallingPrizeQuery,
  nftSupplementActivityLogList,
  nftSupplementActivityLogDetails,

  getEggTimeLogById,
  getNftRandomFallingPrize
}
